package com.wmlive.hhvideo.heihei.mainhome.adapter;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import java.util.List;

/**
 * Created by lsq on 7/4/2017.
 */

public class MainNewViewPagerAdapter extends FragmentPagerAdapter {
    private List<Fragment> fragmentList;

    public MainNewViewPagerAdapter(FragmentManager fm, List<Fragment> fragments) {
        super(fm);
        fragmentList = fragments;
    }

    @Override
    public Fragment getItem(int position) {
        return fragmentList.get(position);
    }

    @Override
    public int getCount() {
        return fragmentList == null ? 0 : fragmentList.size();
    }
}
